package com.loop.mapDemo;

import java.util.HashMap;
import java.util.HashSet;

public class HashTest {
    public static void main(String[] args) {
        HashMap<Person, Integer> map = new HashMap<>();
        map.put(new Person("卢本伟",22),1);
        map.put(new Person("卢本伟",22),1);
        HashSet<Person> set = new HashSet<>();
        set.add(new Person("卢本伟",22));
        set.add(new Person("卢本伟",22));
        System.out.println(map);
        System.out.println(set);

        Integer a = 1;
        Integer b = 1;
        Integer v = 1;
        Integer d = 1;
        getSum(a,b,v,d);
    }

    public static int getSum(int... num){
        int sum = 0;
        for (int n: num) {
            sum += n;
        }
        return sum;
    }
}
